home *** CD-ROM | disk | FTP | other *** search
/ Workplace Effectiveness:…ecision-Making Strategies / Workplace Effectiveness: Decision-Making Strategies.iso / pc / Files / Sound.dxr / 00003_On-Off Music.ls < prev    next >
Encoding:
Text File  |  1998-12-03  |  1.1 KB  |  40 lines

  1. property switch
  2. global gMasterData
  3.  
  4. on mouseDown me
  5.   case the switch of me of
  6.     #on:
  7.       if not (the musicChoice of gMasterData) then
  8.         set the member of sprite (the spriteNum of me + 1) to member "off"
  9.         set the member of sprite the spriteNum of me to member "on dn"
  10.         updateStage()
  11.         switchMusic(gMasterData)
  12.       end if
  13.     #off:
  14.       if the musicChoice of gMasterData then
  15.         set the member of sprite (the spriteNum of me - 1) to member "on"
  16.         set the member of sprite the spriteNum of me to member "off dn"
  17.         updateStage()
  18.         switchMusic(gMasterData)
  19.       end if
  20.   end case
  21. end
  22.  
  23. on beginSprite me
  24.   case the switch of me of
  25.     #on:
  26.       if the musicChoice of gMasterData then
  27.         set the member of sprite the spriteNum of me to member "on dn"
  28.       end if
  29.     #off:
  30.       if not (the musicChoice of gMasterData) then
  31.         set the member of sprite the spriteNum of me to member "off dn"
  32.       end if
  33.   end case
  34. end
  35.  
  36. on getPropertyDescriptionList
  37.   set propList to [#switch: [#comment: "On or Off:", #format: #symbol, #range: [#on, #off], #default: #on]]
  38.   return propList
  39. end
  40.